package springboot.application.controller;

import springboot.application.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description:
 *
 * 1. 验证 application.yml 配置文件读取参数
 */

@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private User user;

    @GetMapping("show")
    public User show(){
        return user;
    }

    /**
     *
     * http://localhost:8080/springboot/user/show
     *
     * {
     *     "username": "xfanonymous",
     *     "password": "18",
     *     "gfs": [
     *         "tt",
     *         "kk",
     *         "xx"
     *     ]
     * }
     */

}
